package com.yuyou.fn.tms.vo.resource;

import com.yuyou.fn.educational.entity.Campus;
import com.yuyou.fn.platform.entity.City;
import com.yuyou.fn.platform.entity.District;
import io.swagger.annotations.ApiModelProperty;

import java.util.Date;

/**
 * Created by lzh on 2019/4/18.
 */
public class ResourceCampus {
    @ApiModelProperty("数据ID")
    private Long deptId ;//数据ID

    @ApiModelProperty("数据名字")
    private String deptName ;//数据名字

    @ApiModelProperty("区域ID")
    private Long masId ;//区域ID

    @ApiModelProperty("区域名字")
    private String masName ;//区域名字

    @ApiModelProperty("城市ID")
    private Long cityId ;//城市ID

    @ApiModelProperty("城市名字")
    private String cityName ;//城市名字

    @ApiModelProperty("0 正常(默认值) 1 已失效（已删除）")
    private Integer state ;//0 正常(默认值) 1 已失效（已删除）

    @ApiModelProperty("创建时间")
    private Date createTime ;//创建时间

    @ApiModelProperty("更新时间")
    private Date modifyTime ;//更新时间

    public ResourceCampus(Campus campus, City city, District district){
        this.setDeptId(campus.getCampusId());//数据ID
        this.setDeptName(campus.getCampusName());//数据名字
        if (district!=null){
            this.setMasId(district.getDistrictId());//区域ID
            this.setMasName(district.getDistrictName());//区域名字
        }
        if (city!=null){
            this.setCityId(city.getCityId());//城市ID
            this.setCityName(city.getCityName());//城市名字
        }
        this.setState(0);//0 正常(默认值) 1 已失效（已删除）
        this.setCreateTime(campus.getCreateTime());//创建时间
        this.setModifyTime(campus.getUpdateTime());//更新时间
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public Long getMasId() {
        return masId;
    }

    public void setMasId(Long masId) {
        this.masId = masId;
    }

    public String getMasName() {
        return masName;
    }

    public void setMasName(String masName) {
        this.masName = masName;
    }

    public Long getCityId() {
        return cityId;
    }

    public void setCityId(Long cityId) {
        this.cityId = cityId;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }
}
